<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Docs for page techniques.php</title>
	<link rel="stylesheet" type="text/css" href="../media/style.css">
	<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
	<script src="media/a.js"></script>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
	<td class="header-top-left"><img src="../media/logo.png" border="0" alt="phpDocumentor " /></td>
    <td class="header-top-right">Examples<br /><div class="header-top-right-subpackage"></div></td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td colspan="2" class="header-menu">
      
                                      
                                    		[ <a href="../classtrees_Examples.html" class="menu">class tree: Examples</a> ]
		[ <a href="../elementindex_Examples.html" class="menu">index: Examples</a> ]
            [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="195" class="menu">
		<div class="package-title">Examples</div>
  <div class="package">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
	</div>
      <b>Packages:</b><br />
  <div class="package">
              <a href="../li_QueryPath.html">QueryPath</a><br />
              <a href="../li_Examples.html">Examples</a><br />
              <a href="../li_Tests.html">Tests</a><br />
      	</div>
      <br />
		<b>Tutorials/Manuals:</b><br />
  <div class="package">
					<strong>Package-level:</strong>
							<ul>
	<li type="square"><a href="../Examples/tutorial_Examples.pkg.html">QueryPath Examples</a>
</ul>

									                        <b>Files:</b><br />
        <div class="package">
				<span style="padding-left: 1em;"><a href="../Examples/_examples---database_import.php.html">database_import.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Examples/_examples---dbpedia.php.html">dbpedia.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Examples/_examples---fetch_rss.php.html">fetch_rss.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Examples/_examples---html.php.html">html.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Examples/_examples---musicbrainz.php.html">musicbrainz.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Examples/_examples---parse_php.php.html">parse_php.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Examples/_examples---rss.php.html">rss.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Examples/_examples---simple_example.php.html">simple_example.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Examples/_examples---sparql.php.html">sparql.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Examples/_examples---svg.php.html">svg.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Examples/_examples---techniques.php.html">techniques.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Examples/_examples---xml.php.html">xml.php</a></span><br />
	  </div>
            <br />
                      </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Procedural File: techniques.php</h1>
Source Location: /examples/techniques.php<br /><br />

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Page Details</div>
	<div class="nav-bar">
					<span class="disabled">Page Details</span> |
									<a href="#sec-includes">Includes</a>
			|											<a href="#sec-functions">Functions</a>
			</div>
	<div class="info-box-body">
		<p align="center" class="short-description"><strong>This file shows five different ways to iterate through the contents of a  QueryPath.
</strong></p>
<span class="description"><p>QueryPath wraps zero or more elements (or, more generally, just objects).  Most of the operations available in QueryPath will operate on the entire  set of objects. Sometimes, though, it is desirable to go through the results  one at a time. These examples exhibit five ways of accomplishing this.</p><p>Keep in mind that PHP passes objects (more or less) by reference, which means  that a change to an item inside of a loop will be reflected in the main QueryPath.  In other words, there is no need to put data back into the QueryPath if it is  altered during a loop.</p></span>		<table border="0" cellspacing="0" cellpadding="0">
			<tr><td><strong>Author:</strong>&nbsp;&nbsp;</td><td>M Butcher &lt;<a href="mailto:matt@aleph-null.tv">matt@aleph-null.tv</a>&gt;</td></tr>
			<tr><td><strong>See:</strong>&nbsp;&nbsp;</td><td><a href="../QueryPath/QueryPath.html">QueryPath</a></td></tr>
			<tr><td><strong>Filesource:</strong>&nbsp;&nbsp;</td><td><a href="../__filesource/fsource_Examples__examplestechniques.php.html">Source Code for this file</a></td></tr>
			<tr><td><strong>License:</strong>&nbsp;&nbsp;</td><td>LGPL</td></tr>
	</table>

			</div>
</div>


	<a name="sec-includes"></a>
	<div class="info-box">
		<div class="info-box-title">Includes</div>
		<div class="nav-bar">
			<a href="#sec-description">Page Details</a> |
						<span class="disabled">Includes</span>
			|													<a href="#sec-functions">Functions</a>
					</div>
		<div class="info-box-body">
			<a name="___/src/QueryPath/QueryPath_php"><!-- --></a>
<div class="evenrow">

	<div>
		<span class="include-title">
			<span class="include-type">require</span>
			(<span class="include-name"><a href="../QueryPath/_src---QueryPath---QueryPath.php.html">'../src/QueryPath/QueryPath.php'</a></span>)
			<span class="smalllinenumber">[line <a href="../__filesource/fsource_Examples__examplestechniques.php.html#a22">22</a>]</span>
		</span>
	</div>

		
		<div class="top">[ <a href="#top">Top</a> ]</div>
		<br />
</div>
		</div>
	</div><br />



	<a name="sec-functions"></a>
	<div class="info-box">
		<div class="info-box-title">Functions</div>
		<div class="nav-bar">
			<a href="#sec-description">Page Details</a> |
										<a href="#sec-includes">Includes</a>
				|												<span class="disabled">Functions</span>
		</div>
		<div class="info-box-body">
			<a name="functioncallbackFunction" id="functioncallbackFunction"><!-- --></a>
<div class="oddrow">

	<div>
		<span class="method-title">callbackFunction</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_Examples__examplestechniques.php.html#a46">46</a>]</span>
	</div>
<br />
	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
		<code>void callbackFunction(
 $index,  $element&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table>

		
    		<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type"></span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$index:&nbsp;</span></td>
				<td>
							</td></tr>
					<tr><td class="indent">
				<span class="var-type"></span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$element:&nbsp;</span></td>
				<td>
							</td></tr>
				</table>
	
<br />
	

		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
	</div>
	</div>
		</div>
	</div><br />

        <div class="credit">
		    <hr class="separator" />
		    Documentation generated on Thu, 19 Mar 2009 18:01:28 -0500 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.2</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>